<?php require_once('../../../wp-load.php');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" style="height:99%">
	<head >
		<title>Picasa Image Express</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<script type="text/javascript" src="swfobject.js"></script>
       
		<script type="text/javascript">
			var flashvars = {};
			<?php 
				// Debug
					foreach($_GET AS $key => $value){
					if(substr($key,0,3) == "pie"){
						echo "\n\t\t\tflashvars.{$key} = \"$value\" ;";
					}
				}
				?>
				
			flashvars.pie_change_user="<?php printf(__('Change User','picasa-images-express'))?>";
			flashvars.pie_cancel="<?php printf(__('Cancel','picasa-images-express'))?>";
			flashvars.pie_no_found="<?php printf(__('No images found.','picasa-images-express'))?>";
			flashvars.pie_images="<?php printf(__(' images. Select image(s) to insert','picasa-images-express'))?>";
			flashvars.pie_image="<?php printf(__(' image. Select image(s) to insert','picasa-images-express'))?>";
			flashvars.pie_select_tip="<?php printf(__('Did you know you can SHIFT-click and CTRL-click to select multiple images?','picasa-images-express'))?>";
			flashvars.pie_back_albums="<?php printf(__('Back to Albums','picasa-images-express'))?>";
			flashvars.pie_retrieving_images="<?php printf(__('Retrieving images...','picasa-images-express'))?>";
			flashvars.pie_change_account="<?php printf(__('Change Picasa user account','picasa-images-express'))?>";
			flashvars.pie_insert_gallery="<?php printf(__('INSERT GALLERY','picasa-images-express'))?>";
			flashvars.pie_options="<?php printf(__('Options','picasa-images-express'))?>";
			flashvars.pie_search="<?php printf(__('Search','picasa-images-express'))?>";
			flashvars.pie_search_tip="<?php printf(__('Search captions and tags','picasa-images-express'))?>";
			flashvars.pie_insert_gallery_setting="<?php printf(__('Insert gallery settings','picasa-images-express'))?>";
			flashvars.pie_insert_as="<?php printf(__('Insert as:','picasa-images-express'))?>";
			flashvars.pie_thumbnails="<?php printf(__('Clickable thumbnails','picasa-images-express'))?>";
			flashvars.pie_fullsize="<?php printf(__('Full-size images','picasa-images-express'))?>";
			flashvars.pie_thumbnail_size="<?php printf(__('Thumbnail size:','picasa-images-express'))?>";
			flashvars.pie_thumbnail_tip="<?php printf(__('Clicking the photo will load a larger version','picasa-images-express'))?>";
			flashvars.pie_large_size="<?php printf(__('Large image size:','picasa-images-express'))?>";
			flashvars.pie_large_tip="<?php printf(__('Clicking the photo will do nothing','picasa-images-express'))?>";
			flashvars.pie_open_as="<?php printf(__('Open as:','picasa-images-express'))?>";
			flashvars.pie_dlink="<?php printf(__('Direct link','picasa-images-express'))?>";
			flashvars.pie_dlink_tip="<?php printf(__('Thumbnail links directly to image','picasa-images-express'))?>";
			flashvars.pie_plink_tip="<?php printf(__('Thumbnail links to Picasa Web Album','picasa-images-express'))?>";
			flashvars.pie_llink_tip="<?php printf(__('Adds support for third-party Lightbox plugins','picasa-images-express'))?>";
			flashvars.pie_hlink_tip="<?php printf(__('Adds support for third-party Highslide plugins','picasa-images-express'))?>";
			flashvars.pie_crop="<?php printf(__('Crop 1:1','picasa-images-express'))?>";
			flashvars.pie_crop_tip="<?php printf(__('Thumbnails are cropped to squares so that they all share the same dimensions','picasa-images-express'))?>";
			flashvars.pie_captions_lab="<?php printf(__('Captions:','picasa-images-express'))?>";
			flashvars.pie_captions_tip="<?php printf(__('Display a caption underneath the image','picasa-images-express'))?>";
			flashvars.pie_display_captions="<?php printf(__('Display captions','picasa-images-express'))?>";
			flashvars.pie_styles="<?php printf(__('Styles and formatting','picasa-images-express'))?>";
			flashvars.pie_css="<?php printf(__('CSS class:','picasa-images-express'))?>";
			flashvars.pie_gallery_css_class="<?php printf(__('Gallery CSS class:','picasa-images-express'))?>";
			flashvars.pie_css_tip1="<?php printf(__('Alignment of image relative to text','picasa-images-express'))?>";
			flashvars.pie_css_tip2="<?php printf(__('Alignment of images relative to text','picasa-images-express'))?>";
			flashvars.pie_margins="<?php printf(__('Image Margins:','picasa-images-express'))?>";
			flashvars.pie_margins_tip1="<?php printf(__('Top margin','picasa-images-express'))?>";
			flashvars.pie_margins_tip2="<?php printf(__('Left margin','picasa-images-express'))?>";
			flashvars.pie_margins_tip3="<?php printf(__('Right margin','picasa-images-express'))?>";
			flashvars.pie_margins_tip4="<?php printf(__('Bottom margin','picasa-images-express'))?>";
			flashvars.pie_error="<?php printf(__('Error - couldn\'t load defaults','picasa-images-express'))?>";
			flashvars.pie_error2="<?php printf(__('Please double check the Picasa user name. Additionally, check your have albums are setup as publicly available','picasa-images-express'))?>";
			flashvars.pie_error3="<?php printf(__('Unable to load albums','picasa-images-express'))?>";
			flashvars.pie_image_size_tip1="<?php printf(__(' &#13;Image size: ','picasa-images-express'))?>";
			flashvars.pie_image_size_tip2="<?php printf(__(' Published: ','picasa-images-express'))?>";
			flashvars.pie_image_size_tip3="<?php printf(__(' &#13;Last updated: ','picasa-images-express'))?>";
			flashvars.pie_insert_image="<?php printf(__('INSERT IMAGE','picasa-images-express'))?>";
			flashvars.pie_insert_image_setting="<?php printf(__('Insert image settings','picasa-images-express'))?>";
			flashvars.pie_select_album="<?php printf(__('Select an Album','picasa-images-express'))?>";
			var params = {};
			params.allowscriptaccess = "always";
			var attributes = {};
			attributes.id = "flashUI";
			swfobject.embedSWF("main.swf", "myAlternativeContent", "100%", "100%", "9.0.0", false, flashvars, params, attributes);
		</script>
		<script type="text/javascript">
			
			function sendToEditor(htmlContent){
				parent.send_to_editor(htmlContent);
				//alert(htmlContent);
				parent.tb_remove();
				return false;
			}
		</script>
		<style type="text/css">
		<!--
		html,body{
			padding:0;
			margin:0;
		}
		
		html{
			height:99%;
		}
		
		body{
			height:100%;
		}
		-->
		</style>
	</head>
	<body style="height:100%">
	<?php 
		//Debug
		/*foreach($_GET AS $key => $value){
			if(substr($key,0,3) == "pie"){
				echo "\n\t\t\tflashvars.{$key} = \"$value\" ;";
			}
		}*/
	?>

		<div id="myAlternativeContent" style="padding:15px;">
			<h1>Flash Player not detected</h1>
			<p>Picasa Image Express requires a more recent version of Adobe Flash Player. <a href="http://www.adobe.com/go/getflashplayer" target="_blank" >Click here to upgrade</a></p>
		</div>
	</body>
</html>